<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>goodjob-index</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="../assets/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="../assets/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="../assets/lib/nprogress/nprogress.css">
    <link rel="stylesheet" href="../assets/lib/notie/notie.css">
    <link rel="stylesheet" href="../assets/css/main.css">
    <style type="text/css">
        th{
            white-space:nowrap;
        }
    </style>
</head>
<body>

<div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">GoodJob</a>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav ">
                <li><a href="../task/index.html">调度</a></li>
                <li class="active"><a href="#log">日志</a></li>
                <!--<li><a href="#monitor">监控</a></li>-->
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">欢迎 <span data-use="showUserInfo"></span></a></li>
            </ul>
        </div>
    </div>
</div>


<div class="main">
    <div class="container">
        <div class="panel panel-primary " style="border: none;">
            <div class="panel-body">
                <form role="form" class="form-horizontal" id="query_exec_form">
                    <div class="form-group">
                        <div class="row">
                            <div class="col-md-4">
                                <label for="projectId">项目</label>

                                <select  id="projectId" class="form-control input-sm" name="projectId">
                                    <option value="-1">--选择项目--</option>
                                    <script id="projectId_options" type="text/html">
                                        {{each plist as project i}}
                                        <option value="{{project.id}}">{{project.name}}</option>
                                        {{/each}}
                                    </script>
                                </select>
                            </div>
                            <div class="col-md-4">
                                <label for="taskConfigId">任务名称</label>

                                <select name="task_config_id" id="taskConfigId" class="form-control input-sm" disabled>

                                </select>
                            </div>
                            <div class="col-md-4">
                                <label for="state" class="">执行状态</label>
                                <select  id="state" class="form-control input-sm" name="state">
                                    <option value="-1">--选择状态--</option>
                                    <option value="0">成功</option>
                                    <option value="1">失败</option>
                                    <option value="2">处理中</option>
                                    <option value="3">超时</option>
                                </select>
                            </div>

                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">

                            <div class="col-md-4">
                                <label for="startTime">开始时间</label>
                                <input type="text" class="form-control input-sm form_datetime" placeholder="选择开始时间"
                                       readonly="readonly"
                                       id="startTime"
                                       name="startTime">
                            </div>
                            <div class="col-md-4">
                                <label for="endTime">结束时间</label>
                                <input type="text" class="form-control input-sm form_datetime" placeholder="选择结束时间"
                                       id="endTime"
                                       name="endTime" readonly="readonly">
                            </div>

                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <div class="col-md-1 col-md-offset-11">
                                <button type="button" class="btn btn-default pull-right btn-sm"
                                        data-use="query_execlist">查询
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="panel panel-default">
            <table class="table table-striped table-responsive table-bordered" id="exec_grid">
                <thead class="">
                <tr>
                    <th>#</th>
                    <th>任务名称</th>
                    <th>任务类型</th>
                    <th>任务状态</th>
                    <th class="text-center">执行信息</th>
                    <th>执行方式</th>
                    <th>开始时间</th>
                    <th>结束时间</th>
                    <th>创建时间</th>
                </tr>
                </thead>
                <tbody>
                <!--<tr>-->
                <!--<td colspan="9" class="text-center">-->
                <!--无数据-->
                <!--</td>-->
                <!--</tr>-->
                </tbody>
            </table>
        </div>

    </div>
</div>


<div id="footer">
    <div class="container">
        <p class="text-muted">调度系统@wac</p>
    </div>
</div>

<!--subjob Modal-->
<div class="modal fade" id="depModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">SubJob view</h4>
            </div>
            <div class="modal-body">


            </div>
            <div class="modal-footer">
                <button class="btn btn-primary btn-sm " data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--分片任务日志-->
<div class="modal fade" id="paramModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">分片任务</h4>
            </div>
            <div class="modal-body">


            </div>
            <div class="modal-footer">
                <button class="btn btn-primary btn-sm " data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<script id="taskConfigId_options" type="text/html">
    {{each tlist as task i}}
    <option value="{{task.id}}">{{task.task_name}}</option>
    {{/each}}
</script>

<script src="../assets/lib/jquery.min.js"></script>
<script src="../assets/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../assets/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="../assets/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
        charset="utf-8"></script>
<script src="../assets/lib/nprogress/nprogress.js"></script>
<script src="../assets/lib/notie/notie.js"></script>
<script src="../assets/lib/fetch.js"></script>
<script src="../assets/lib/template.js"></script>
<script src="../assets/script/util.js"></script>
<script src="./exec.js"></script>
</body>
</html>
